package com.bestv.bsr.core.exceptions;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 基础异常
 *
 * @author taojiacheng
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 所属模块
     */
    private final String module;

    /**
     * 错误码
     */
    private final Integer errorCode;

    /**
     * 错误内容
     */
    private final String message;

    /**
     * 错误码对应的参数
     */
    private final Object[] args;


    public BaseException(String module, Integer errorCode, String message, Object[] args) {
        this.module = module;
        this.errorCode = errorCode;
        this.message = message;
        this.args = args;
    }

}
